﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Abp.AutoMapper;
using Abp.Domain.Entities;
using FwProject.Comm.ExcelUtil;
using FwProject.Core.Restaurant;

namespace FwProject.Restaurant.Dto
{
    [AutoMap(typeof(RestaurantInfo))]
    [DisplayName(displayName:"收退统计")]
    public class DepositListDto:Entity<Guid>
    {
        /// <summary>
        /// 工厂编号
        /// </summary>
        [Display(Name = "所属工厂")]
        public Guid FactoryinfoId { get; set; }
        /// <summary>
        /// 餐厅名称
        /// </summary>
        [Display(Name = "餐厅名称")]
        [DisplayName(displayName:"餐厅名称")]
        [ExcelDateMember(IsMerged =true)]
        public string RestaurantName { get; set; }
        public string RestaurantAddress { get; set; }

        [ExcelDateMember(IsMultiRow =true,IsClass =true)]
        public List<DepositModel> DepositList { get; set; }
    }

    [AutoMap(typeof(DepositInfo))]
    public class DepositModel
    {
        public Guid Id { get; set; }
        [DisplayName(displayName:"状态")]
        [ExcelDateMember(IsMultiRow =true)]
        public DepositStatus DepositStatus { get; set; } = DepositStatus.未提交;
        /// <summary>
        /// 押金编号
        /// </summary>
        [Display(Name = "押金编号")]
        [DisplayName(displayName: "押金编号")]
        [ExcelDateMember(IsMultiRow = true)]
        public string CreationNumber { get; set; }
        /// <summary>
        /// 收退方式
        /// </summary>
        [Display(Name = "收退类型")]
        [DisplayName(displayName: "类型")]
        [ExcelDateMember(IsMultiRow = true)]
        public DepositType DepositType { get; set; } = DepositType.收押金;
        [DisplayName(displayName: "日期")]
        [ExcelDateMember(IsMultiRow = true)]
        public DateTime CreationTime { get; set; }
        /// <summary>
        /// 金额
        /// </summary>
        [Display(Name = "金额")]
        [DisplayName(displayName: "金额")]
        [ExcelDateMember(IsMultiRow = true)]
        public double Money { get; set; } = 0.00;
        
        public long? CreatorUserId { get; set; }
        
    }
}
